package com.example.arithmeticleetcode.learnArithmetic.set;

/**
 * @program: arithmetic-leetcode
 * @description:
 * @author: FangZhen
 * @create: 2020-10-20 16:30
 **/
public interface Set<E> {

    int size();

    boolean isEmpty();

    void clear();

    boolean contains(E element);

    void add(E element);

    void remove(E element);

    void tranversal(Visitor<E> visitor);

    public static abstract class Visitor<E> {
        boolean stop;
        abstract boolean visit(E element);
    }

}
